﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNetCore.BannerManagement.DAL.Domain.dnc_ZoneRepositoryArtifacts;
using DotNetCore.BannerManagement.DAL.Domain.dnc_ZoneImageRepositoryArtifacts;

namespace DotNetCore.BannerManagement.BLL
{
    public class ZoneManager
    {
        /// <summary>
        /// Will return a list of all zones in the database
        /// </summary>
        /// <returns></returns>
        public List<Domain.dnc_Zone> GetAllZones()
        {
            // Get repository
            dnc_ZoneRepository repository = new dnc_ZoneRepository();

            // return a list of all zones
            return repository.GetAllFromdnc_Zone();

        }

        /// <summary>
        /// Will return a zone based on its ID
        /// </summary>
        /// <param name="zoneID"></param>
        /// <returns></returns>
        public Domain.dnc_Zone GetZoneByID(int zoneID)
        {
            // Get repository
            dnc_ZoneRepository repository = new dnc_ZoneRepository();

            // return a list of all zones
            return repository.Getdnc_ZoneByID(zoneID);

        }

        /// <summary>
        /// Will return a zone image by its ID
        /// </summary>
        /// <param name="zoneImageID"></param>
        /// <returns></returns>
        public Domain.dnc_ZoneImage GetZoneImageByID(int zoneImageID)
        {

            // Get repository
            dnc_ZoneImageRepository repository = new dnc_ZoneImageRepository();

            // return a list of all zones
            return repository.Getdnc_ZoneImageById(zoneImageID);

        }
    }
}
